package com.imti.controller;



import com.imti.Api.CommonResult;
import com.imti.dot.ProductDot;
import com.imti.service.ProductService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;



/**
 * (Product)表控制层
 *
 * @author makejava
 * @since 2023-02-03 15:06:05
 */
@RestController
@RequestMapping("product")
public class ProductController {
    /**
     * 服务对象
     */
    @Resource
    private ProductService productService;


    /**
     * 查询药品价格
     * @param productName
     * @return
     */
    @PostMapping("/FindProductInfoByName")
    @ResponseBody
    public CommonResult<List<ProductDot>> FindProductInfoByName(String productName){
        if (productName==""||productName==null){
            productName="";
        }
        return CommonResult.success(productService.FindProductInfoByName(productName));
    }


}